<template>
	<Container>
		<view class="header">
			<image class="articleImage" :src="assignment.comparedArticle.imageUrl" :class="{ articleLight: questionPress }" mode="aspectFit"></image>
			<AudioIcon @iconTap="iconTap" :questionPress="questionPress" />
		</view>
		<Question :question="assignment.questionName" />
		<Record ref="audio" @recordFinish="recordFinish" :isStart="questionPress" :answerText="assignment.answerTexts" :typeCode="assignment.typeCode" />
	</Container>
</template>

<script>
import { mixins } from '../../../common/mixins/assignmentDefault.js'
import AudioIcon from '../audioIcon.vue'
import Question from '../questionName.vue'
import Container from '../container.vue'
import Record from '../record.vue'
export default {
	mixins: [mixins],
	components: { AudioIcon, Question, Container, Record }
}
</script>

<style scoped lang="stylus">
.header
	height 45vh
	width 100%
	border-radius 70rpx
	border 12rpx solid #FCC77D
	box-sizing border-box
	position relative
	margin 5vh 0
	display flex
	align-items center
	justify-content center
	.articleImage
		width 70%
		height 70%
</style>
